#pragma once
#include "../Timer.h"

class Camera
{
private:
	float x, y;
	int w, h, x_to, y_to;
	bool moving;

	float shake_power, speed;
	bool shaking;
	int shake_duration, shake_fadeInDuration, shake_fadeOutDuration;
	int shake_x, shake_y;
	bool shake_fadeIn, shake_fadeOut;
	Timer shake_timer;

public:
	Camera(int x, int y, int w, int h);
	~Camera(void);
	void update();
	void move_x(int x_to);
	void move_y(int y_to);
	void move_to(int x, int y);
	void set_speed(float speed);
	void set_x(int x_to);
	void set_y(int y_to);
	void set_pos(int x, int y);
	int get_x();
	int get_y();
	void shake(float power, int duration, bool fadeIn, 
				   int fadeInDuration, bool fadeOut, int fadeOutDuration); //duration in msec
};
